import Vue from "vue";
import VueI18n from "vue-i18n";
// 语言列表
import {locale as en} from "@/core/config/i18n/en";
import {locale as ch} from "@/core/config/i18n/ch";
Vue.use(VueI18n);
let messages = {};
messages = {...messages, en, ch};
// 获取当前选定语言
const lang = localStorage.getItem("language") || "ch";
// 使用选项创建VueI18n实例
const i18n = new VueI18n({
    // 设置区域设置
    locale: lang,
    // 设置区域设置消息
    messages
});
export default i18n;
